package com.future.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.future.domain.AnswerSheet;
import com.future.domain.query.AnswerSheetQuery;
import com.future.domain.vo.AnswerSheetVO;
import com.future.domain.vo.AnswerSheetVOForSuggestion;
import com.future.domain.vo.GetAnswerSheetVO;
import com.future.domain.vo.SAnswerSheetVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


@Mapper
public interface AnswerSheetMapper extends BaseMapper<AnswerSheet> {

    List<AnswerSheetVO> getByCondition(@Param("query")AnswerSheetQuery query);
    Long countByCondition(@Param("query")AnswerSheetQuery query);



    List<AnswerSheetVO> getHealthDetailByPage(Map<String,Object> mp);

    //历史问卷得分
    List<SAnswerSheetVo> getHistory(Map<String,Object> mp);

    AnswerSheetVO getById(@Param("id") Long id,@Param("qId") Long qId);
    /**
     *  获取答卷详情
     * @param qId 问卷id
     * @param userId 用户id
     * @return
     */
    GetAnswerSheetVO getAnswerSheet(@Param("questionnaire_id") Long qId,@Param("userId") Long userId);


    List<AnswerSheetVOForSuggestion> getallAnswerSheetById(@Param("user_id") Long userId);















}
